package com.woniuxy.result;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @Author: linKe
 * @Date: 2021/11/25 8:14
 * @FileName: Result
 * @version: 1.0
 * @Description: 全局消息响应类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "全局响应对象",description = "用于返回前端所需的包装对象")
public class Result <T>{
    @ApiModelProperty(value = "响应状态码",notes = "成功时响应200，其它为错误")
    public String code;
    @ApiModelProperty(value = "响应消息",notes = "成功响应ok，其它为错误")
    public String msg;
    @ApiModelProperty(value = "响应实体对象",notes = "可为空，单一对象，或者集合，数组等")
    public T data;
}
